home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / 3dprograms / rayshade-4.0 / fixes / fix027.accellenh < prev   
Text File  |  1995-02-13  |  5KB  |  155 lines

  1. (Message inbox:574)
  2. From mlschroe@immd4.informatik.uni-erlangen.de Tue Aug  9 09:43:03 1994
  3. Received: from tbird.cc.iastate.edu (tbird.cc.iastate.edu [129.186.140.11]) by packrat.vorpal.com (8.6.9/8.3) with ESMTP id JAA20542; Tue, 9 Aug 1994 09:43:00 -0500
  4. Received: from faui45.informatik.uni-erlangen.de (faui45.informatik.uni-erlangen.de [131.188.2.45]) by tbird.cc.iastate.edu (8.6.5/8.6.5) with SMTP id JAA02728 for <explorer@vorpal.com>; Tue, 9 Aug 1994 09:42:47 -0500
  5. Received: from faui43.informatik.uni-erlangen.de by uni-erlangen.de with SMTP;
  6.     id AA08259 (5.65c-6/7.3w-FAU); Tue, 9 Aug 1994 16:41:21 +0200
  7. Received: by immd4.informatik.uni-erlangen.de;
  8.     id AA21277 (5.65c-6/7.3m-FAU); Tue, 9 Aug 1994 16:41:20 +0200
  9. From: "Michael Schroeder (Inf4 - hiwi)" <mlschroe@immd4.informatik.uni-erlangen.de>
  10. Message-Id: <199408091441.AA21277@faui43.informatik.uni-erlangen.de>
  11. Subject: Re: rayshade-4.1.0.tar.gz
  12. To: "Michael Graff" <explorer@vorpal.com>
  13. Date: Tue, 9 Aug 94 16:41:19 DST
  14. In-Reply-To: <199408090928.EAA29572@packrat.vorpal.com>; from "Michael Graff" at Aug 9, 94 4:28 am
  15. X-Mailer: ELM [version 2.3 PL11]
  16.  
  17. > This is an unofficial release of Rayshade, called 4.1 because of the
  18. > new features included.  I expect there will be problems and such, and
  19. > welcome patches and suggestions.
  20. > I have placed the file on 
  21. >     ftp://tbird.cc.iastate.edu/pub/rayshade/rayshade-4.1.0.tar.gz
  22. > so grab it and make comments.  There is a lot of cleaning up to do yet,
  23. > which I hope to do over the next few weeks between working and preparing
  24. > for classes this semester.
  25. > Comments, bug fixes, suggestions, flames, and hard drives welcome.  :)
  26.  
  27. I just checked "ftp.uni-erlangen.de:/pub/graphics/rayshade" and
  28. noticed that some of my patches were missing.
  29. I looked in the ftp tree and realized that there were two rayshade
  30. directories: pub/graphics/rayshade and /pub/graphics/graphics/rayshade
  31. I copied my patches into the graphics/graphics directory :(
  32.  
  33. I moved graphics/rayshade to graphics/rayshade.xx and made a
  34. symlink from graphics/graphics/rayshade, so the next time
  35. you will be in the right directory. Sorry.
  36.  
  37. Anyway some points about 4.1.0:
  38.  
  39. 1) You should apply UNAPPLIED/shadowbug. Don't distribute a buggy
  40.    version. (The first hunk will reject - it is already applied
  41.    in 4.1.0)
  42.  
  43. 2) Please apply accellenh:
  44.    On some platforms (e.g. mot88) it is much faster to do float
  45.    multiplication than division. Thus if you have to divide
  46.    a vektor by a scalar it is better to invert the scalar and do
  47.    multiplications.
  48.  
  49. 3) lightenh allows lightsources that falloff with the distance to the
  50.    object squared. If you are interested, ftp it.
  51.  
  52. Michael.
  53.  
  54. ---------------------------------------------------------------
  55. Michael Schroeder    mlschroe@faui43.informatik.uni-erlangen.de
  56. main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}
  57.  
  58. accellenh:
  59. *** libray/libcommon/transform.c.orig    Tue Aug  9 09:55:18 1994
  60. --- libray/libcommon/transform.c    Tue Aug  9 16:02:21 1994
  61. ***************
  62. *** 254,260 ****
  63.   {
  64.       RSMatrix ttmp;
  65.       int i;
  66. !     Float d;
  67.       extern int yylineno;
  68.   
  69.       ttmp.matrix[0][0] = trans->matrix[1][1]*trans->matrix[2][2] -
  70. --- 254,260 ----
  71.   {
  72.       RSMatrix ttmp;
  73.       int i;
  74. !     Float d, invd;
  75.       extern int yylineno;
  76.   
  77.       ttmp.matrix[0][0] = trans->matrix[1][1]*trans->matrix[2][2] -
  78. ***************
  79. *** 285,302 ****
  80.       if (fabs(d) < EPSILON*EPSILON)
  81.           RLerror(RL_PANIC, "Singular matrix.\n",yylineno);
  82.   
  83. !     ttmp.matrix[0][0] /= d;
  84. !     ttmp.matrix[0][2] /= d;
  85. !     ttmp.matrix[1][1] /= d;
  86. !     ttmp.matrix[2][0] /= d;
  87. !     ttmp.matrix[2][2] /= d;
  88. !     d = -d;
  89. !     ttmp.matrix[0][1] /= d;
  90. !     ttmp.matrix[1][0] /= d;
  91. !     ttmp.matrix[1][2] /= d;
  92. !     ttmp.matrix[2][1] /= d;
  93.   
  94.       ttmp.translate.x = -(ttmp.matrix[0][0]*trans->translate.x +
  95.                    ttmp.matrix[1][0]*trans->translate.y +
  96. --- 285,303 ----
  97.       if (fabs(d) < EPSILON*EPSILON)
  98.           RLerror(RL_PANIC, "Singular matrix.\n",yylineno);
  99.   
  100. !         invd = 1 / d;
  101. !     ttmp.matrix[0][0] *= invd;
  102. !     ttmp.matrix[0][2] *= invd;
  103. !     ttmp.matrix[1][1] *= invd;
  104. !     ttmp.matrix[2][0] *= invd;
  105. !     ttmp.matrix[2][2] *= invd;
  106. !     invd = -invd;
  107. !     ttmp.matrix[0][1] *= invd;
  108. !     ttmp.matrix[1][0] *= invd;
  109. !     ttmp.matrix[1][2] *= invd;
  110. !     ttmp.matrix[2][1] *= invd;
  111.   
  112.       ttmp.translate.x = -(ttmp.matrix[0][0]*trans->translate.x +
  113.                    ttmp.matrix[1][0]*trans->translate.y +
  114. *** libray/libcommon/vecmath.c.orig    Tue Aug  9 09:55:27 1994
  115. --- libray/libcommon/vecmath.c    Tue Aug  9 16:02:21 1994
  116. ***************
  117. *** 41,54 ****
  118.   VecNormalize(a)
  119.   register Vector *a;
  120.   {
  121. !     Float d;
  122.   
  123.       d = sqrt(a->x*a->x + a->y*a->y + a->z*a->z);
  124.       if (equal(d, 0.))
  125.           return 0.;
  126. !     a->x /= d;
  127. !     a->y /= d;
  128. !     a->z /= d;
  129.   #ifdef CRAY
  130.       /*
  131.        * The Cray Research Inc. math functional units don't work in the IEEE
  132. --- 41,55 ----
  133.   VecNormalize(a)
  134.   register Vector *a;
  135.   {
  136. !     Float d, invd;
  137.   
  138.       d = sqrt(a->x*a->x + a->y*a->y + a->z*a->z);
  139.       if (equal(d, 0.))
  140.           return 0.;
  141. !     invd = 1.0 / d;
  142. !     a->x *= invd;
  143. !     a->y *= invd;
  144. !     a->z *= invd;
  145.   #ifdef CRAY
  146.       /*
  147.        * The Cray Research Inc. math functional units don't work in the IEEE
  148.  
  149.